package com.comp7940.groupf.tgbot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.comp7940.groupf.tgbot.entity.AccInfo;
import com.comp7940.groupf.tgbot.entity.Util;
import com.comp7940.groupf.tgbot.mapper.UtilMapper;
import com.comp7940.groupf.tgbot.service.UtilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UtilServiceImpl implements UtilService {
    @Autowired
    private UtilMapper utm;
    @Override
    public List<Util> ps(Util args) {
        QueryWrapper<Util> wrapper = new QueryWrapper<>();
        if (args.getName() != null)
            wrapper.like("name", args.getName());
        if (args.getLang() != null)
            wrapper.like("lang", args.getLang());
        return utm.selectList(wrapper);
    }
}
